//
// Created by Administrator on 2025/7/18.
//
#include "Test7.h"
#include <filesystem>
#include <iostream>


void Test7::foo() {
    std::cout << this->age << *this->name;
}


void Test8::test() {

}

void Test8::foo3() {
    //inline 修饰的方法必须只能是一行 多余一行无视inline
    std::cout << this->b;
}


void Test7TestFile::foo2(int *

c,
                         std::initializer_list<int> varargs
) {
}

int Test7TestFile::foo3(const std::string &vc) {
    try {
        throw MyException2();
    } catch (std::exception &e) {
        std::cout << e.what();
        std::cout << "?";
    }
    return 1;
}

const char *MyException2::what() const noexcept {
    return "dawdaw";
}

void signalHandler(int sigType) {
    std::cout << "sigType ->" << sigType;
}

//常量表达式
constexpr int getIndex(int a, int b) {
    return a + b;
}

void Test7C3::foo1() {
    static int d = 1;
    d++;
    std::cout << d;
}

void Test7C3::foo2() const {
    std::string s(this->c);
    s.append("dwadwad");
    this->c = const_cast<char *>(s.c_str());
    std::cout << this->c;
}
